{% extends "base.html" %}

{% block content %}

<h1>Edit/create</h1>

<form action="/save_page" method="post">
{% if page %}
<input type="hidden" name="key" value="{{ page.key }}" />
<div>Title: <input type="text" name="title" value="{{ page.title }}" /></div>
<div>Public: <input type="checkbox" name="public" value="public" {% if page.public %}checked="checked" {% endif %}/> ID: <input type="text" name="public_id" value="{{ page.public_id }}" /> {% if public_id_bad %}The ID "<strong>{{public_id_bad}}</strong>" you requested was already taken or not valid, please choose another.{% endif %}</div>
<textarea name="content" cols="80" rows="20">{{ page.content }}</textarea><br />
{% else %}
<div>Title: <input type="text" name="title" /></div>
<textarea name="content" cols="80" rows="20"></textarea><br />
{% endif %}
<input type="submit" value="save">
</form>

{% endblock %}
